<?php
/**
 * wp-foundation sidebar-extensions.php
 */
function foundation_custom_search() {
	global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }}

	if($fd_search_button_text == "blank"){
		$fd_search_button_text = " ";
	}
	if($fd_default_search_text == "blank"){
		$fd_default_search_text = " ";
	}
?>
	<div id="searchform-wrap" class="widget-area">
		<h3 class="widget-title">
			<?php $fd_search_heading_text ?>
		</h3>
	<form id="searchform" method="get" action="<?php get_bloginfo('home') ?>">
		<div>
	
	<?php if (is_search()) { ?>
		<input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true); ?>" tabindex="1" />
	<?php } else {  ?>
		<input id="s" name="s" type="text" value="<?php echo $fd_default_search_text; ?>" onfocus="if (this.value == '<?php echo $fd_default_search_text; ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php echo $fd_default_search_text; ?>';}" tabindex="1" />
	<?php
		}
	if ($fd_search_buttom_show == "Show"){
	?>
		<input id="searchsubmit" name="searchsubmit" type="submit" value="<?php echo $fd_search_button_text; ?>" tabindex="2" />
	<?php
		}
	?>
	</div></form></div>
	
	<?php

}
add_action('foundation_custom_search_area', 'foundation_custom_search');
?>